List of active orders

Retrieves the list of active orders with their statuses.

Request syntax

GET http://b2b-api.go.yandex.ru/integration/2.0/orders/active?user_id={user ID} 

Request headers

  • Authorization: Bearer <OAuth-token>
    OAuth access token. The steps to get a token are described in Getting started.
  • X-YaTaxi-Selected-Corp-Client-Id — client ID from the account. Required if multiple clients are available using the token.

Request parameters

The request has one required parameter:

  • user_id: ID of the employee whose orders should be viewed.

Response field description

The response contains the following field:

Field Description Format
items An array containing data about the routes. Array of objects

Structure of the items array element:

Field

Description

Format

id

Order ID.

String

status

Order status. Possible values:

  • search — Order created, searching for driver.
  • driving — Driver was found and is heading to the vehicle pickup location.
  • waiting — Driver has arrived and is waiting for an employee.
  • transporting — Employee is in the car and en route.
  • complete — Order completed successfully.
  • cancelled — Order cancelled at client’s or employee’s request.
  • failed — Order canceled by the car park because the driver couldn’t complete it.
  • expired — Order status unknown. This is returned if the car park didn’t send data about the order status in time.
  • scheduling — Order created; search for the driver will begin some time before the car is provided.
  • scheduled — Order created, driver assigned and will head for the employee according to the pickup time. Orders in this status can be modified.

String

Request example

GET http://b2b-api.go.yandex.ru/integration/2.0/orders/active?user_id=0354...3c71 
... 
Authorization: Bearer <OAuth-token>
X-YaTaxi-Selected-Corp-Client-Id: <client-id> 

Response example

An example of a response to this request:

{ "items": 
    [ 
        { 
            "id": "8f7...c83", 
            "status": "driving" 
        }, 
        { 
            "id": "71e...05c", 
            "status": "transporting" 
        } 
    ] 
} 

Response codes

A response to this request may contain the following HTTP codes:

  • 200 — request completed successfully.
  • 403:
    • SELECT_CLIENT_HEADER_REQUIRED: the request did not pass the header X-YaTaxi-Selected-Corp-Client-Id (returned if more than one client is available for the token).
    • SELECTED_CLIENT_ACCESS_DENIED: the header X-YaTaxi-Selected-Corp-Client-Id contains the client's ID, which this login does not have access to.